<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<title>文件管理器 -- Powered by CentIMS {$core_version}</title>
		<link href="{'ui/smoothness/jquery-ui-1.8.20.c.css'|jquery}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap.css'|shared}" rel="stylesheet"/>
		<link href="{'bootstrap/css/bootstrap-responsive.css'|shared}" rel="stylesheet"/>
		<link href="{'plupload/css/jquery.plupload.queue.css'|shared}" rel="stylesheet"/>
		<link href="{'common.css'|shared}" rel="stylesheet"/>
		<link href="../share/attach.css" rel="stylesheet"/>	
		<link href="files.css" rel="stylesheet"/>
	</head>
	<body>
		<div class="workspace">			
			<ul class="breadcrumb">
			  <li>
			    <a href="{$url|params:'-dir'}">根目录</a>
			  </li>
			  {foreach $dirs as $dir}
			  	  {if !$dir@last}
				  <li>
				  	<span class="divider">/</span>
				    <a href="{$url|params:'dir':$dir[1]}">{$dir[0]}</a>				    
				  </li>
				  {else}
				  <li class="active">
				  	<span class="divider">/</span>
				  	{$dir[0]}
				  </li>
				  {/if}
			  {/foreach}
			  			  
			  <li class="pull-right">
			  	<a href="#" id="btn-upload"><i class="icon-upload"></i>上传</a>
			  </li>
			  
			  <li class="pull-right">
			  	<a href="#" id="btn-new-dir"><i class="icon-folder-close"></i>新建目录</a>
			  </li>
			  
			  <li class="pull-right" style="margin-right:30px;">
			  	<div class="btn-group" data-toggle="buttons-radio">
				  	<a href="{$url|params:'view':'list'}" class="btn btn-mini {if $view=='list'}active{/if}" title="列表视图"><i class="icon-th-list"></i></a>
				  	<a href="{$url|params:'view':'icon'}" class="btn btn-mini {if $view=='icon'}active{/if}" title="图标视图"><i class="icon-th-large"></i></a>
			  	</div>
			  </li>
			  <li class="pull-right" style="margin-right:10px;">
			  	  	<div class="btn-group">
			          <button class="btn btn-mini">{$sortname}</button>
			          <button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
			          <ul class="dropdown-menu">
				            <li><a href="{$url|params:'sort':'ext'}">按类型</a></li>
				            <li><a href="{$url|params:'sort':'name'}">按名称</a></li>
				            <li><a href="{$url|params:'sort':'size'}">按大小</a></li>
				            <li><a href="{$url|params:'sort':'mtime'}">按时间</a></li>
			          </ul>
		        	</div>
			  </li>
			</ul>
			<input type="hidden" id="cwd" value="{$cwd}"> 
		</div>	
		<div class="workspace">			
			{include file=$view_tpl}			
			<div class="form-horizontal">
				<div class="control-group pull-left">
					<div class="btn-group">
						<button class="btn" id="btn-selectall" href="#"><i class="icon-check"></i>全选/反选</button>
						<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
						<ul class="dropdown-menu">			            
							{'get_file_bench_options'|fire}			            		            
						</ul>
					</div>
				</div>
				<div class="pagination pull-right">
					<ul><li><a>共{$totalDir}个目录,{$totalFile}个文件,</a></li><li><a>总大小:{$totalSize}</a></li></ul>
				</div>
			</div>
		</div>
		
		<div class="hide" title="创建目录" id="new-dir-dialog">
		  	<label>目录名</label>
		  	<input type="text" class="span3" placeholder="目录名" id="newdirname"/>
		  	<p class="help-block">不能重名,不能包含特殊字符.</p>
		</div>
		<div class="hide" title="上传" id="upload-file-dialog">
			<form id="upload-from"  method="post" action="./?Ctlr=UploadDone">
				<input type="hidden" name="cwd" id="upload-cwd"/>
			    <div id="uploader"></div>
			</form>
		</div>
		<script type="text/javascript" src="{'jquery-1.7.1.js'|jquery}"></script>
		<script type="text/javascript" src="{'ui/jquery-ui-1.8.20.c.js'|jquery}"></script>
		<script type="text/javascript" src="{'plupload/plupload.js'|shared}"></script>
		<script type="text/javascript" src="{'plupload/jquery.plupload.queue.js'|shared}"></script>
		<script type="text/javascript" src="{'bootstrap/bootstrap.js'|shared}"></script>
		<script type="text/javascript" src="{'jquery.form.js'|jquery}"></script>
		<script type="text/javascript" src="{'common.js'|shared}"></script>
		<script type="text/javascript" src="files.js"></script>
	</body>
</html>